﻿@model eduscrum.ViewModels.ProjectVM

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Project</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StartDate)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.StartDate, new { @id = "datepickerProjectStart", @Value = Model.EndDate.ToString("dd-MM-yyyy"), @readonly = "readonly" })
            @Html.ValidationMessageFor(model => model.StartDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EndDate)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.EndDate, new { @id = "datepickerProjectEnd", @Value = Model.EndDate.ToString("dd-MM-yyyy"), @readonly = "readonly" })
            @Html.ValidationMessageFor(model => model.EndDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PhaseCount)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.PhaseCount)
            @Html.ValidationMessageFor(model => model.PhaseCount)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SprintDuration)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.SprintDuration)
            @Html.ValidationMessageFor(model => model.SprintDuration)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Cancel", "Index")
</div>
